package app.objectstoragedemo.Pojo.FinalClass;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;


@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ConfigurationProperties(prefix = "com.storage")
public class AppConfig {
    @Value("${server.port}")
    private int serverPort;
    @Value("${com.storage.uploadPath}")
    private String uploadPath = "./efault/path"; // 设置默认值
    @Value("${com.storage.enableHtml}")
    private boolean enableHtml = true;
    @Value("${com.exe.openBrowser}")
    private boolean openBrowser = true;


    private  String host = "http://localhost:";
    // 获取本地网站的地址，并加上本地网站的端口号
    public String getLocalhostPort() {
        return host + serverPort + "/";
    }

}

